package com.wx.disparent.mallparent.dao;

import com.wx.disparent.mallparent.commons.inface.IBaseMapper;
import com.wx.disparent.mallparent.entity.ProblemEntity;
import com.wx.disparent.mallparent.entity.UserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository
@Mapper
public interface FrontUserMapper extends IBaseMapper<UserEntity> {
    UserEntity findByMap(Map map);
    UserEntity SumWelfareMoney(Map map);

    UserEntity findByLoginMap(Map<String, String> loginMap);

    List<UserEntity> getLowerUsers(int id);
    UserEntity findById(@Param("id") int id);

    UserEntity findByUserName(String username);

    UserEntity findByPhone(String phone);

    UserEntity findByEmail(String email);

    Integer updateById(UserEntity userEntity);

    Integer updatePassWdById(UserEntity userEntity);

    String findByProblem(String problem);

    List<ProblemEntity> findAllProblem();


    Integer updateByIdPayAcct(UserEntity userEntity);

    Integer updateLastLogin(HashMap<String,Object> lastMap);

    List<UserEntity> findLowerUsers(Integer id);




    /*int updateLastLogin(UserEntity userEntity);*/
}
